import request from "@/utils/request";
// const BASE_URL = "/v1/design/tasks";
const BASE_URL = "/salvage/threadcard/schemes";
// 穿心解卡导出方案
export function queryList(query) {
  return request({
    url: BASE_URL,
    method: "get",
    params: query,
  });
}
//方案新建（无模板）
export function createSchemes(wellId) {
  return request({
    url: BASE_URL,
    method: "post",
    data: { wellId }
  });
}

//方案数据查询
export function getDataOne(id) {
  return request({
    url: BASE_URL + "/" + id + "/data",
    method: "get",
  });
}

//方案数据更新
export function updateOne(schemeId, data) {
  return request({
    url: BASE_URL + "/" + schemeId + "/data",
    method: "put",
    data: data,
  });
}
//方案删除
export function deleteOne(id) {
  return request({
    url: BASE_URL + "/" + id,
    method: "delete",
  });
}

//导出模板列表
// export function exportList(query) {
//   return request({
//     url: "/design/export/templates",
//     method: "get",
//     params: query,
//   });
// }

export default {
  queryList,
  createSchemes,
  getDataOne,
  updateOne,
  deleteOne
}